package aden.Generic;


public class GenViewPointsTool extends GenViewTool
{
	public GenViewPointsTool(Gen2DView inView,
			                 int       inMaxCount)
	{
		super(inView);
		mMaxCount = inMaxCount;
		mCount = 0;
		mXs = new float[mMaxCount];
		mYs = new float[mMaxCount];
	}
	
	public boolean Init()
	{
		mCount = 0;
		return true;
	}

	public boolean OnTouchUp(float inX,
			               float inY)
	{
		mXs[mCount] = inX;
		mYs[mCount] = inY;
		++mCount;
		
		if (mCount == mMaxCount)
		{
			mCount = 0;
			return ProcessEnd(true);
		}
		return true;
	}	
	
	private int mMaxCount;
	private int mCount;
	protected float[] mXs;
	protected float[] mYs;
}